import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  Picker,
  Text,
} from 'react-native';

export default class PickerDemo extends Component {

  static navigationOptions = {
    title: 'Picker',
  };

  state = {
    language: '',
    position: 0,
  }

  render() {
    return (
      <View style={{flex:1}}>

          <Picker
              itemStyle={{color:'blue'}}
              prompt='Picker'
              mode = 'dialog'
              selectedValue={this.state.language}
              onValueChange={(lang,position) => this.setState({language: lang,position:position})}>
              <Picker.Item label="电子商务" value="电子商务" />
              <Picker.Item label="互联网" value="互联网" />
              <Picker.Item label="哈哈" value="哈哈" />
          </Picker>
      </View>

    );
  }
}